<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <el-menu
    :default-active="activeIndex"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
  >
    <el-menu-item index="1"> <RouterLink to="/">Home</RouterLink></el-menu-item>
    <el-menu-item index="2"> <RouterLink to="/about">About</RouterLink></el-menu-item>
    </el-menu>
  

  <RouterView />
</template>

<style lang="ts"  scoped>
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</style>
